
class P640 {
	
	public static void main(String[] args) {
		int length = 1000001;
		
		boolean[] numbers = new boolean[length];
		
		for (int k = 1; k < length; k++) {
			int index = k + sumDigits(k);
			if (index < length) {
				numbers[index] = true;
			}
		}
		
		StringBuffer sb = new StringBuffer();
		
		for (int k = 1; k < length-1; k++) {
			if (!numbers[k]) {
				sb.append(k + "\n");
			}
		}
		
		sb.append(length-1);
		
		System.out.println(sb.toString());
		
	}

	private static int sumDigits(int n) {
		String number = n + "";
		int counter = 0;
		int length = number.length();
		for (int k = 0; k < length; k++) {
			counter += number.charAt(k) - '0';
		}
//		System.out.println(">> "+ n + " -> "+ counter + "|" + (counter + n));
		return counter;
	}
	
}
